Next | Prev | Up | Top | Contents | Index

Modifying the Aliases Database

After modifying a station's sendmail.cf file (see "Customizing the sendmail.cf File"), the alias database file should also be modified to reflect your sendmail environment. If you don't have any "private" company aliases, you still need to modify the aliases file to provide it with a valid postmaster alias.


Creating the Aliases File

Continuing with the fictitious example used in "Customizing the sendmail.cf File", assume that the administrator for the domain corp.fictitious.com has derived a list of aliases for the corp.fictitious.com domain. The list of aliases is shown in Table 8-1.

Sample aliases File Entries
Alias NameMemberStation Name
financejohnfin1
financepaulfin2
financemaryfin3
corpsharoncorp1
corppamcorp2
corppetercorp3
allfinance and corpN/A
postmastermailmgrcorp1

The /etc/aliases file entries based on the list of aliases generated by the administrator would look like this:

############################################################# 
# Aliases in this file will NOT be expanded in the header 
# from Mail, but WILL be visible over networks or from 
# /bin/mail. 
# >>>>>>>>> The program "newaliases" must be run after 
# >> NOTE >> this file is updated for any changes to 
# >>>>>>>>>> show through to sendmail. 
############################################################# 
start of common aliases--do not remove this line 
# Add the following alias to enable Yellow Page aliases. If 
# enabled, the YP database defines anything not defined in 
# this file. 
#+:+ 
# Alias for mailer daemon 
MAILER-DAEMON:postmaster 
# send mail likely to be lost to the mail server 
rootcsh:postmaster 
rootsh:postmaster 
. 
. 
. 
games:postmaster 
# Following alias is required by RFC 822 
# You should change 'root' in the first line below to 
# the administrator of this machine, and un-comment the 
# following line. 
postmaster:root 
root:mailmgr@corp1 
# aliases to handle mail to msgs and news 
nobody: /dev/null 
# end of common aliases--do not remove this line 
# corp.fictitious.com aliases 
finance:john@fin1,paul@fin2,mary@fin3 
corp:sharon@corp1,pam@corp2,peter@corp3 
all:finance,corp 

Updating the aliases Database

After you modify the /etc/aliases text database file, run the newaliases program to incorporate the text changes into the DBM files, /etc/aliases.dir and /etc/aliases.pag.

Update the aliases database:

/usr/bsd/newaliases

If there is nothing wrong with your aliases database, newaliases lists the number of aliases and then return your prompt. If you see any other message, most likely there is a problem with your aliases file. See "Debugging Flags" for hints on troubleshooting the alias file.


Next | Prev | Up | Top | Contents | Index